package org.infodavid.common.ejb.components;

import javax.persistence.Embeddable;

import org.hibernate.annotations.Immutable;

import org.infodavid.common.model.IGenericProperty;
import org.infodavid.common.model.ModelFactory;
import org.infodavid.common.model.impl.GenericPropertiesMapImpl;

/**
 * The Class GenericPropertiesMapComponent.
 */
@Embeddable
@Immutable
public class GenericPropertiesMapComponent extends GenericPropertiesMapImpl {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 2353080613615949664L;

	/**
	 * Instantiates a new component.
	 * @throws Exception
	 */
	public GenericPropertiesMapComponent() throws Exception {
		super();
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.data.impl.GenericDataMapImpl#instantiateData()
	 */
	@Override
	public IGenericProperty instantiateData() {
		try {
			return ModelFactory.getInstance().create(IGenericProperty.class);
		}
		catch (final Exception e) {
			throw new InstantiationError(e.getMessage());
		}
	}
}
